import request from '@/utils/request'

export default {
  orderList(params) {
    return request({
      url: '/v1/orderList',
      method: 'get',
      params
    })
  },
  getOne(id) {
    return request({
      url: `/v1/order/${id}`,
      method: 'get'
    })
  },
  update(data) {
    return request({
      url: '/v1/orderUpdate',
      method: 'post',
      data
    })
  },
  create(data) {
    return request({
      url: '/v1/orderAdd',
      method: 'post',
      data
    })
  },
  delete(id) {
    return request({
      url: `/v1/orderDel/${id}`,
      method: 'get'
    })
  },
  append(data) {
    return request({
      url: '/v1/orderAppend',
      method: 'post',
      data
    })
  },
  remove(data) {
    return request({
      url: '/v1/orderRemove',
      method: 'post',
      data
    })
  }
}
